package a04_Abstract.Person;

/**
 * @Author quan
 * @Description 子类：老师类
 * @Date 2023/2/28 17:35
 */
public class Teacher extends Person{
    public Teacher(){};
    public Teacher(String name){
        super(name);
    }
    @Override//父类中已有的方法进行重写
    public void getInfo(){
        System.out.println("老师的姓名为"+getName());
    }
    public void teach(){
        System.out.println("老师在教书");
    }
}
